package club.framework.web.application.sys.menu.entity;

import club.framework.web.base.entity.BaseEntity;

import java.util.List;

/**
 * Created by 念梓  on 2017/9/5.
 * Email:sunmch@163.com
 * author: 念梓
 * des:页面显示菜单实体类
 */
public class Menu extends BaseEntity {

    private int parentId;

    private int sort;   //排序

    private int step=1;  //层级

    private String url;

    private String code;

    private String icon;

    private String parentCode;

    private List<Menu> children;

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public int getStep() {
        return step;
    }

    public void setStep(int step) {
        this.step = step;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getParentCode() {
        return parentCode;
    }

    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }

    public List<Menu> getChildren() {
        return children;
    }

    public void setChildren(List<Menu> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Menu{");
        sb.append("parentId=").append(parentId);
        sb.append(", sort=").append(sort);
        sb.append(", step=").append(step);
        sb.append(", url='").append(url).append('\'');
        sb.append(", code='").append(code).append('\'');
        sb.append(", icon='").append(icon).append('\'');
        sb.append(", parentCode='").append(parentCode).append('\'');
        sb.append(", children=").append(children);
        sb.append('}');
        return sb.toString();
    }
}
